{include file="public/header" /}
<span class="layui-breadcrumb">
  <a href="{:url('Blog/index')}?nav=blog-bloglist">分类</a>
  <a><cite>编辑-{$one['cname']}-中文</cite></a>
</span>
<style> 
.layui-form-label{width:200px;}
.layui-form-item .layui-input-block{margin-left:230px;}
</style>
<div class="layui-fluid">
    <div class="layui-card">
    	<form class="layui-form" id="product_form" action="" style='padding:10px'>
        <div class="layui-form-item">
              <label class="layui-form-label">正文内容</label>
              <div class="layui-input-block">
                <textarea id="zh_des" name="zh_des" style="width:100%;">{$one['zh_des']}</textarea>
              </div>
          </div>

        <div class="layui-form-item">
              
              <label class="layui-form-label">筛选后正文</label>
              <div class="layui-input-block">
                <textarea id="zh_des_s" name="zh_des_s" style="width:100%;">{$one['zh_des_s']}</textarea>
              </div>
          </div>

        <div class="layui-form-item">
            <label class="layui-form-label">列表h1</label>
            <div class="layui-input-block">
              <textarea id="zh_h" name="zh_h" style="width:100%;height:80px;">{$one['zh_h']}</textarea>
            </div>
        </div>
        <hr>
        <div class="layui-form-item">
            <label class="layui-form-label">列表标题</label>
            <div class="layui-input-block">
              <textarea id="zh_title" name="zh_title" style="width:100%;height:80px;">{$one['zh_title']}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">列表关键词</label>
            <div class="layui-input-block">
              <textarea id="zh_keyword" name="zh_keyword" style="width:100%;height:80px;">{$one['zh_keyword']}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">列表描述</label>
            <div class="layui-input-block">
              <textarea id="zh_description" name="zh_description" style="width:100%;height:80px;">{$one['zh_description']}</textarea>
            </div>
        </div>
        <hr>
        <div class="layui-form-item">
            <label class="layui-form-label">列表筛选标题</label>
            <div class="layui-input-block">
              <textarea id="sel_zh_title" name="sel_zh_title" style="width:100%;height:80px;">{$one['sel_zh_title']}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">列表筛选关键词</label>
            <div class="layui-input-block">
              <textarea id="sel_zh_keyword" name="sel_zh_keyword" style="width:100%;height:80px;">{$one['sel_zh_keyword']}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">列表筛选描述</label>
            <div class="layui-input-block">
              <textarea id="sel_zh_description" name="sel_zh_description" style="width:100%;height:80px;">{$one['sel_zh_description']}</textarea>
            </div>
        </div>
        <hr>

        <div class="layui-form-item">
            <label class="layui-form-label">详情标题</label>
            <div class="layui-input-block">
              <textarea id="zh_d_title" name="zh_d_title" style="width:100%;height:80px;">{$one['zh_d_title']}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">详情关键词</label>
            <div class="layui-input-block">
              <textarea id="zh_d_keyword" name="zh_d_keyword" style="width:100%;height:80px;">{$one['zh_d_keyword']}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">详情描述</label>
            <div class="layui-input-block">
              <textarea id="zh_d_description" name="zh_d_description" style="width:100%;height:80px;">{$one['zh_d_description']}</textarea>
            </div>
        </div>
        <hr>

        <div class="layui-form-item">
              <label class="layui-form-label">详情内容</label>
              <div class="layui-input-block">
                <textarea id="zh_content" name="zh_content" style="width:100%;">{$one['zh_content']}</textarea>
              </div>
          </div>
        
        <div class="layui-form-item">
          <label class="layui-form-label"></label>
          <div class="layui-input-block">
             <button type='button' class="layui-btn layui-btn-normal" onclick="tijiao({$one['id']})">确定</button>
          </div>
        </div>

		</form>
    </div>
</div>
{include file="/public/footer" /}
<script charset="utf-8" src="/static/kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="/static/kindeditor/lang/zh-CN.js"></script>
<script>
 KindEditor.ready(function(K) {
    window.editor=K.create('#zh_des',{'items':['source', '|', 'undo', 'redo', '|','selectall', 'preview', 'print', 'code', 'cut', 'copy', 'paste','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript','superscript', 'clearhtml', 'quickformat', '|','formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold','italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak','anchor', 'link', 'unlink','|', 'fullscreen'],'uploadJson':"{:url('index/Oos/upload_classdes')}",afterCreate : function() { this.sync(); },afterBlur: function(){this.sync();}
    });
    window.editor=K.create('#zh_des_s',{'items':['source', '|', 'undo', 'redo', '|','selectall', 'preview', 'print', 'code', 'cut', 'copy', 'paste','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript','superscript', 'clearhtml', 'quickformat', '|','formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold','italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak','anchor', 'link', 'unlink','|', 'fullscreen'],'uploadJson':"{:url('index/Oos/upload_classdes')}",afterCreate : function() { this.sync(); },afterBlur: function(){this.sync();}
    });
    window.editor=K.create('#zh_content',{'items':['source', '|', 'undo', 'redo', '|','selectall', 'preview', 'print', 'code', 'cut', 'copy', 'paste','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript','superscript', 'clearhtml', 'quickformat', '|','formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold','italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak','anchor', 'link', 'unlink','|', 'fullscreen'],'uploadJson':"{:url('index/Oos/upload_classdes')}",afterCreate : function() { this.sync(); },afterBlur: function(){this.sync();}
    });

  })
 function tijiao(id){
    layer.load();
    var zh_des=$.trim($("textarea[name='zh_des']").val());
    var zh_des_s=$.trim($("textarea[name='zh_des_s']").val());
    var zh_h=$.trim($("textarea[name='zh_h']").val());
    var zh_title=$.trim($("textarea[name='zh_title']").val());
    var zh_keyword=$.trim($("textarea[name='zh_keyword']").val());
    var zh_description=$.trim($("textarea[name='zh_description']").val());
    var sel_zh_title=$.trim($("textarea[name='sel_zh_title']").val());
    var sel_zh_keyword=$.trim($("textarea[name='sel_zh_keyword']").val());
    var sel_zh_description=$.trim($("textarea[name='sel_zh_description']").val());
    var zh_d_title=$.trim($("textarea[name='zh_d_title']").val());
    var zh_d_keyword=$.trim($("textarea[name='zh_d_keyword']").val());
    var zh_d_description=$.trim($("textarea[name='zh_d_description']").val());
    var zh_content=$.trim($("textarea[name='zh_content']").val());

  
    $.post("{:url('Classify/zhedit')}",{id:id,
      zh_des:zh_des,
      zh_des_s:zh_des_s,
      zh_h:zh_h,
      zh_title:zh_title,
      zh_keyword:zh_keyword,
      zh_description:zh_description,
      sel_zh_title:sel_zh_title,
      sel_zh_keyword:sel_zh_keyword,
      sel_zh_description:sel_zh_description,
      zh_d_title:zh_d_title,
      zh_d_keyword:zh_d_keyword,
      zh_d_description:zh_d_description,
      zh_content:zh_content},function(res){
      if(res.status=='0'){
        layer.closeAll('loading');
        layer.msg(res.msg);
      }
      if(res.status=='1'){
        layer.msg(res.msg,{time: 500 },
        function(){
          layer.closeAll();
          location.href=location.href;
        });
      }
    })
 }
</script>
